#include "Plane.h"

Plane::Plane(void) : Object()
{
	m_iPositionX2 = m_iPositionY2 = 0;
	SetType(PLANE);
}

Plane::~Plane(void)
{
}

void Plane::Update(float frameTime)
{

}

void Plane::Render()
{
	/*VideoDriver::GetInstance()->SetColor(0x00ff00);*/

	//just use for plane x == x2 or y == y2
	VideoDriver::GetInstance()->FillRect(
		(int)m_iPositionX,
		(int)m_iPositionY,
		m_iPositionX2 - (int)m_iPositionX + 1,
		m_iPositionY2 - (int)m_iPositionY + 1);

	/*VideoDriver::GetInstance()->DrawLine(
		m_iPositionX, m_iPositionY,
		m_iPositionX2, m_iPositionY2);*/

}

void Plane::SetPostionEndPoint(int posX2, int posY2)
{
	m_iPositionX2 = posX2;
	m_iPositionY2 = posY2;
}

bool Plane::IsInRect(int x, int y)
{
	return false;
}

void Plane::HandleTouchAction(Touch *touch)
{
	
}
